#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n;
	double a = 2, b = 1;
	double sum = 0,temp = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		sum += a / b;
		temp = a;
		a = a + b;
		b = temp;
	}
	printf("%.4lf", sum);
}
